package com.heima.wemedia.config;

import com.heima.wemedia.interceptor.WmTokenInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * ClassName:WebMcvConfig
 * Package:com.heima.wemedia.config
 * Description:
 *
 * @Author: zongyu
 * @Create: 2024/3/4 - 15:03
 */
@Configuration
public class WebMcvConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry){
        registry.addInterceptor(new WmTokenInterceptor())
                .addPathPatterns("/**");
    }
}
